Repository navigation
Remember menu cursor position when navigating back from a submenu - #703
Closed
berendkleinhaneveld wants to merge 1 commit into
Closed
berendkleinhaneveld wants to merge 1 commit into
berendkleinhaneveld wants to merge 1 commit into
Conversation
Drilling into a submenu pushed only the menu id onto the navigation stack, so going back reset the cursor to the top of the parent list. The stack now records the selected row alongside the menu id, and goBack restores it, keeping the cursor where the user left it.
Author
|
Closing in favor of the upstream fix. This repo is a fork of The best-conditioned one is omacom/omarchy#12644 ("Return the menu cursor to the entered row when going back"):
Once omacom#12644 is merged upstream, this fork can pick it up by merging |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When navigating the Omarchy Menu (Super+Space) with arrow keys, drilling into a submenu and then going back (Left/Backspace) resets the cursor to the top of the parent list instead of returning to the item you were on. This makes exploring the menu harder for new users.
Fix
The navigation stack previously stored only the parent menu id. It now records the selected row index alongside it when entering a submenu, and
goBack()restores that index when returning to the parent menu.shell/plugins/menu/Menu.qml:navStackentries are now{ menu, selectedIndex }objectssetActiveMenu()saves the currentselectedIndexwhen pushing history, and accepts an optionalrestoreIndexparametergoBack()passes the rememberedselectedIndexwhen returning to the parent menutest/shell.d/menu-test.sh: three new assertions covering save/restore behaviorVerification
test/shell.d/menu-test.shand related menu suites)./test/shellrun: only pre-existing, environment-specific failures (identical on cleanquattro)qmllintwarning count unchanged (188 before and after)